RemoteControl

A generic remote control. This is the base class to manage a specific remote control.

Types

Link copied to clipboard

Properties

Link copied to clipboard

Remote control model.

Link copied to clipboard
abstract val name: String

Remote control friendly name.

Link copied to clipboard
abstract val state: DeviceState

Remote control current state

Link copied to clipboard
abstract val uid: String

Remote control unique identifier.

Functions

Link copied to clipboard
abstract fun connect(): Boolean

Connects the remote control.

abstract fun connect(connector: DeviceConnector, vararg parameters: ConnectionParameter): Boolean

Connects the remote control using the specified device connector and custom parameters.

Link copied to clipboard
abstract fun disconnect(): Boolean

Disconnects the remote control.

Link copied to clipboard
abstract fun forget(): Boolean

Forgets the remote control.

Link copied to clipboard
abstract fun <I : Instrument> getInstrument(instrumentClass: Class<I>): I?

Gets an instrument.

abstract fun <I : Instrument> getInstrument(instrumentClass: Class<I>, observer: Ref.Observer<I>): Ref<I>

Gets an instrument and registers an observer notified each time it changes.

Link copied to clipboard
abstract fun getName(observer: Ref.Observer<String>): Ref<String>

Gets the remote control friendly name and registers an observer notified each time it changes.

Link copied to clipboard
abstract fun <T : Peripheral> getPeripheral(peripheralClass: Class<T>): T?

Gets a peripheral.

abstract fun <T : Peripheral> getPeripheral(peripheralClass: Class<T>, observer: Ref.Observer<T>): Ref<T>

Gets a peripheral and registers an observer notified each time it changes.

Link copied to clipboard
abstract fun getState(observer: Ref.Observer<DeviceState>): Ref<DeviceState>

Gets current remote control state and registers an observer notified each time it changes.